
module windump.xml.document;

import windump.xml.node;
import windump.xml.element;
import windump.xml.exception;

class XmlDocument : XmlNode
{
    public this(char[] name)
    {
        super(name);
    }

    public this()
    {
        super("");
    }

    public override char[] outerXml()
    {
        char[] ret =
            `<?xml version="1.0" encoding="utf-8"?>` ~ "\n";

        foreach(XmlNode child; m_children)
        {
            ret ~= child.outerXml;
        }

        return ret;
    }

    public override char[] innerXml()
    {
        //assert(false);
        return "";
    }


}

